﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mota.XMLControls
{
    public class DBTreeGroup
    {
        private String groupName;
        private String groupByMember;
        private String groupByDisplayMember;
        private String groupByValueMember;

        private int groupImageIndex;
        private int groupSelectedImageIndex;

        public DBTreeGroup(String name, String groupBy, String displayMember,
            String valueMember, int imageIndex, int selectedImageIndex)
        {
            this.ImageIndex = imageIndex;
            this.Name = name;
            this.GroupBy = groupBy;
            this.DisplayMember = displayMember;
            this.ValueMember = valueMember;
            this.SelectedImageIndex = selectedImageIndex;
        }

        public DBTreeGroup(String name, String groupBy, String displayMember,
            String valueMember, int imageIndex) :
            this(name, groupBy, displayMember, valueMember, imageIndex, imageIndex)
        {
        }

        public DBTreeGroup(String name, String groupBy) :
            this(name, groupBy, groupBy, groupBy, -1, -1)
        {
        }

        public int SelectedImageIndex
        {
            get
            {
                return groupSelectedImageIndex;
            }
            set
            {
                groupSelectedImageIndex = value;
            }
        }
        public int ImageIndex
        {
            get
            {
                return groupImageIndex;
            }
            set
            {
                groupImageIndex = value;
            }
        }

        public String Name
        {
            get
            {
                return groupName;
            }
            set
            {
                groupName = value;
            }
        }

        public String GroupBy
        {
            get
            {
                return groupByMember;
            }
            set
            {
                groupByMember = value;
            }
        }

        public String DisplayMember
        {
            get
            {
                return groupByDisplayMember;
            }
            set
            {
                groupByDisplayMember = value;
            }
        }

        public String ValueMember
        {
            get
            {
                return groupByValueMember;
            }
            set
            {
                groupByValueMember = value;
            }
        }
    }
}
